home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1994 November / Cd Ware (Nro. 2) - Epimundo.iso / DOS / PG / CHART.ZIP / CWORK.86 < prev    next >
Encoding:
Text File  |  1993-11-02  |  8.7 KB  |  302 lines

  1.  
  2.         ;workspace
  3.         ;option keypress values
  4.  
  5. keys    db 'LCBEISYNPJDURTKVGAMOXHF'
  6.  
  7.         ;option jump addresses
  8.  
  9.         even    ;allign data
  10.  
  11. option_jump:
  12.         dw link_option    ;insert
  13.         dw create_box    ;create/cancel
  14.         dw branch    ;branch
  15.         dw delete_box    ;delete
  16.         dw insert_box    ;insert
  17.         dw single    ;single
  18.         dw yes_option    ;select yes route
  19.         dw no_option    ;select no route
  20.         dw move_to_route    ;previous route
  21.         dw create_subchart    ;create subchart
  22.         dw down    ;goto subchart
  23.         dw up_option    ;up from subchart
  24.         dw relinquish    ;relinquish branch
  25.         dw end_sub_option    ;end sub
  26.         dw copy_subchart    ;copy subroutine
  27.         dw view    ;view box
  28.         dw goto    ;goto box
  29.         dw ammend    ;ammend box description
  30.         dw renumber    ;renumber chart option
  31.         dw merge_chart    ;load - merge - existing chart
  32.         dw xchange    ;xchange single/decision box
  33.         dw search    ;search for string
  34. akey_addresses:
  35.         dw yes_route    ;forward route
  36.         dw yes_route    ;yes route
  37.         dw no_route    ;no route
  38.  
  39.         ;arrow key values
  40.  
  41. akeys:
  42.         dw 05000h    ;down arrow
  43.         dw 04b00h    ;left arrow
  44.         dw 04800h    ;up arrow
  45.  
  46.         ;table to option strings
  47.  
  48. options_table:
  49.         dw >a1    ;'Link' option string
  50.         dw >a2    ;'Create' option string
  51.         dw >a3    ;'Branch' option string
  52.         dw >a4    ;'Erase' option string
  53.         dw >a5    ;'Insert' option string
  54.         dw >a6    ;'Simple' option string
  55.         dw >a7    ;'Yes' option string
  56.         dw >a8    ;'No' option string
  57.         dw >a10    ;'Previous' option string
  58.         dw >a11    ;'J)subchart' option string
  59.         dw >a12    ;'Down' option string
  60.         dw >a13    ;'Up' option string
  61.         dw >a14    ;'Relinquish branch' string
  62.         dw >a15    ;'Terminate' option string
  63.         dw >a16    ;'K)subroutine' option string
  64.         dw >a17    ;'View function' option string
  65.         dw >a18    ;'Go to box' option string
  66.         dw >a19    ;'ammend box' option string
  67.         dw >a20    ;'M)renumber' option string
  68.         dw >a21    ;'Load' option string
  69.         dw >a22    ;'X)change' option string
  70.         dw >a23    ;'H)search' option string
  71.         dw >a24    ;'Cancel' option string
  72.  
  73.         ;option strings
  74.  
  75. a1 db 'Link',0
  76. a2 db 'Create',0
  77. a3 db 'Branch',0
  78. a4 db 'Erase',0
  79. a5 db 'Insert',0
  80. a6 db 'Simple',0
  81. a7 db 'Yes',0
  82. a8 db 'No',0
  83. a10 db 'Previous',0
  84. a11 db 'J)subchart',0
  85. a12 db 'Down',0
  86. a13 db 'Up',0
  87. a14 db 'R)unlink',0
  88. a15 db 'Terminate',0
  89. a16 db 'K)copy subchart',0
  90. a17 db 'View descripter',0
  91. a18 db 'Goto',0
  92. a19 db 'A)edit',0
  93. a20 db 'M)renumber',0
  94. a21 db 'O)load',0
  95. a22 db 'X)change',0
  96. a23 db 'H)search',0
  97. a24 db 'Cancel',0
  98.  
  99.         even
  100.  
  101.         ;bookmarks
  102.  
  103. bookmarks dw 10 dup 0    ;bookmarks
  104.  
  105. db '. '
  106.  
  107. end_program_data equ $
  108.  
  109.         data segment
  110.  
  111.         org end_program_data
  112.  
  113. command_line db 80 dup ?    ;command top line buffer
  114.  
  115.         even    ;word align code pointer
  116.  
  117. option_array dw option_count+2 dup ?    ;options available array
  118.  
  119. option_jump_offset equ option_jump-(option_array+2)
  120.  
  121. route_exists_flag dw ?
  122. option_routes dw 4 dup ?    ;extra route options
  123. routes dw 5 dup ?    ;temporary store for routes of box
  124. current_route dw ?    ;current route element offset
  125. route dw ?    ;store for route offset/box
  126. route_select dw ?    ;current selected route offset
  127. insert_mode dw ?    ;insert mode flag
  128. first_branch_route dw ?    ;route offset to first branched route
  129. branch_route_count dw ?    ;total of branched routes
  130. first_route dw ?    ;route offset of first fixed route
  131. key_option dw ?    ;key option
  132. route_flag dw ?    ;flag used by get options routine
  133. real_routes dw ?    ;total of fixed routes
  134. stem_start dw ?    ;stem marker
  135. centre_box dw ?    ;highlighted box
  136. view_box dw ?    ;box being linked
  137.  
  138. route_follow dw ?    ;following route from box being written
  139. offset_row equ route_follow    ;current row offset from main path (used
  140.             ;by printer routine)
  141.             ;to screen
  142. main_route dw ?    ;following box route
  143.  
  144. subchart_route dw ?    ;route of copied subchart
  145. terminating_route dw ?    ;route of terminating box in subchart
  146. indicator db 6 dup ?    ;indicator string that is by the side of
  147.             ;the following stem of centre box
  148. left_route db 80 dup ?    ;left route string
  149.  
  150.         ;path record workspace
  151.  
  152. path_box equ left_route    ;store for path record box number
  153. path_routes equ left_route+2    ;branches to other path records if bit
  154.             ;15 is set then branch is to other path
  155.             ;record elsewhere, if bit 14 is set then
  156.             ;branch is to new path
  157. path_column equ left_route+6    ;column of path, from centre + is left
  158.             ;and - is right
  159. path_row equ left_route+8    ;row of box corresponding to main path
  160. path_directions equ left_route+10    ;direction of branches left or right
  161.  
  162. seg_count equ left_route+14    ;box segment count in map (printer)
  163. map_start equ left_route+16    ;address to start of map
  164. map_start2 equ left_route+20    ;address to start of map
  165. map_end equ left_route+24    ;end of current map address
  166. end_maps equ left_route+28    ;end of map data
  167.  
  168.         ;string workspace
  169.  
  170. left_route_end dw ?    ;size of left route
  171. right_route db 40 dup ?    ;buffer to right side of horizontal stem
  172. s db 256 dup ?    ;string buffer
  173. link_string db 10 dup ?    ;used to indicate box being linked
  174. number_buffer db 21+11 dup ?    ;used to store route of box
  175.  
  176.         even
  177.  
  178. descripter_string db 256 dup ?    ;descripter string buffer
  179. descripter_count dw ?    ;length of descripter string in buffer
  180. message db 80 dup ?    ;bottom line message buffer
  181. message_length dw ?    ;message length
  182. box_save dw ?    ;store for current box
  183. link_box dw ?    ;box being linked
  184.  
  185. box_to_subchart dw ?    ;leading box to copied subchart
  186. route_to_subchart dw ?    ;leading route of it
  187. subchart_link dw ?    ;box that follows from copied subchart
  188. box_of_route dw ?    ;box of route of box
  189. box dw ?        ;box store
  190. follow_route dw ?    ;following route of following box
  191. follow_box dw ?    ;used by screen routine
  192. box_route dw ?
  193. trailing_box dw ?
  194. route_exists dw ?    ;flag indicating route exists
  195.  
  196. chart dw 2 dup ?    ;20 bit address of start of chart data
  197. start_free_memory dw 2 dup ?    ;20 bit address of end of chart data
  198. ram_top dw 2 dup ?    ;20 bit address to end of free memory
  199.  
  200. other_boxes dw 2 dup ?    ;store for other box routes
  201. column_count equ other_boxes+2    ;total number of columns in chart
  202.  
  203. other_box_routes dw 2 dup ?
  204. stack_mark equ other_box_routes    ;used to mark stack pointer
  205.  
  206. obro equ other_box_routes-other_boxes
  207.  
  208. akey_jump dw 3 dup ?    ;contains jump addresses for arrow key
  209.             ;route options
  210.  
  211. akey_jump_offset equ (akey_jump-akeys)-2
  212.  
  213. shift_count dw 2 dup ?    ;used to store number of bytes to move
  214.  
  215.         ;stores to preserve registers upon interrupt
  216.  
  217. _sp dw ?        ;used to preserve the stack pointer
  218. _ss dw ?
  219.  
  220.         ;stack pointers
  221.  
  222. end_stack dw ?    ;pointer to end of program data
  223. sub_stack dw ?    ;subchart stack pointer
  224. stack_segment dw ?    ;segment of subchart stack
  225. subchart_box dw ?    ;temporary store for return box and its
  226. subchart_parent dw ?    ;parent on stack
  227. levels dw ?    ;level count when moving from end of
  228.             ;subchart to next parent box
  229.  
  230.         ;video workspace
  231.  
  232. video_pointer dw ?    ;offset to video map
  233. video_base dw ?    ;base of video screen map
  234. video_backup dw 2000 dup ?    ;backup for video when in background
  235. crtc_address dw ?    ;crtc port address for background mode
  236.  
  237.         ;editing workspace
  238.  
  239. end_string dw ?    ;end of string being edited
  240. edit_cursor dw ?    ;cursor coordinates
  241. start_string dw ?    ;start of string being edited
  242. start_string_screen dw ?    ;start of string seen on line
  243. escape_flag dw ?    ;indicates if escape key enabled
  244.  
  245.  
  246. temp1 dw 2 dup ?    ;temporary variables
  247. temp2 dw 2 dup ?
  248. temp3 dw 2 dup ?
  249. temp4 dw 2 dup ?
  250. temp5 dw ?
  251.  
  252. reserve dw 2 dup ?    ;store for reserved bytes
  253.  
  254. current_box dw ?    ;current box
  255. next_box dw ?    ;next new box
  256.  
  257. menu db menu_options dup ?    ;menu options available string
  258. flag db ?    ;flags
  259. new_chart db ?    ;0ffh if no flowchart in memory
  260. chart_flag db ?    ;flowchart loop entry flag
  261. chart_active db ?    ;0 if out into dos
  262. middle_5 db ?    ;non zero if middle 5 down
  263. cursor_pos db 3 dup ?    ;screen cursor coordinates
  264. this_box db ?    ;box that is written to screen
  265. hypen db ?    ;hypen flag if descripter is split
  266. left_route_indicator db ?    ;indicator character for left route stem
  267. route_string db 3 dup ?    ;route indicator string
  268. err db ?        ;flags
  269. box_made db ?    ;chart entry flag
  270. split_line db 3 dup ?    ;flag indicating descripter string split
  271. hyphen db ?    ;0 if no hyphen at end of line
  272.  
  273. attribute db ?    ;video character aptribute
  274. active_page db ?    ;current video page
  275. direct_video db ?    ;video output flag; 0ffh write direct
  276.  
  277.         even
  278.  
  279. display_match dw ?    ;restore display if lsb=msb
  280.  
  281.         ;cursor variables
  282.  
  283. cursorxy dw ?    ;cursor position
  284. cursor_data dw ?    ;used to preserve position of cursor
  285. cursor_type dw ?    ;used to preserve state of cursor
  286. cursor_on dw ?
  287. exit_cursor_type dw ?    ;original state of cursor
  288. saved_screen dw 2 dup ?    ;pointer to interrupted screen dump
  289. display_type dw ?    ;type of display to remain with
  290. filename db 66 dup ?    ;used to store flowchart filename
  291. handle dw ?    ;handle for reading/writing to/from disk
  292.  
  293. search_string db 128 dup ?    ;buffer for search string
  294.  
  295. end_program:
  296.  
  297. program_size equ end_program/16+1
  298.  
  299. start_of_chart equ ((end_program/16)+1)*16
  300.  
  301.         ;end
  302.